package com.zzf.eduservice.client;

import com.zzf.commonutils.R;
import com.zzf.eduservice.client.impl.VodFileDegradeFeignClient;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)
public interface VodClient {

    //定义需要调用的其他组件的接口
    //根据视频id删除阿里云视频
    @DeleteMapping("eduvod/video/removeAlyVideo/{id}")
    public R removeAliVideo(@PathVariable("id") String id);
    //这里特别注意@PathVariable("id")里边一定要指定参数名称


    //批量删除视频
    @DeleteMapping("eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
